package com.da.springtest.ioc.primary;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author chenlida
 * @date 2020/6/13 22:35
 * @description
 */
public class TestMethod {
    public static void main(String[] args) {
        String beanXml = "classpath:bean/beanPrimary.xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(beanXml);
        PrimaryBean.IService service = context.getBean(PrimaryBean.IService.class);
        System.out.println(service);
        PrimaryBean primaryBean = context.getBean(PrimaryBean.class);
        System.out.println(primaryBean);

    }
}